import { createI18n } from "vue-i18n";
import { default as zh } from "./modules/zh";
import { default as en } from "./modules/en";
import { getBrowserLang } from "@/utils";

const messages = {
  zh,
  en
};

const i18n = createI18n({
  locale: getBrowserLang(),
  legacy: false, // 组合式api
  globalInjection: true, // 挂载$t,$d等到全局
  messages: messages
});

export default i18n;
